{:widget('common/header')}
<body>
<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
            <div class="header">
                <form id="form" class="layui-form" action="search" method="get">
                    <div class="search-box">
                        <input type="text" style="width: 80%;float: left" class="layui-input" name="wd" id="search"
                               value=""
                               placeholder="请输入搜索内容"/>
                        <button><i class="layui-icon layui-icon-search"></i></button>
                    </div>
                    <input type="hidden" id="apiType" name="apiType" value="0">
                    <!--      api 选择      -->
                    <div class="s-api-box">
                        <div class="b-play-link">
                            {foreach $apiList as $key=>$vo }
                            {if ($apiType==$key)}
                            <div data-id="{$key}" class="j-submit layui-btn layui-btn-xs layui-btn-warm">{$vo}</div>
                            {else/}
                            <div data-id="{$key}" class="j-submit layui-btn layui-btn-xs layui-btn-normal">{$vo}</div>
                            {/if}
                            {/foreach}
                        </div>
                    </div>
                </form>
            </div>
            <div class="box">
                {foreach $list as $key=>$vo }
                <div class="b-box j-play" data-id="{$vo.id}">
                    <div class="b-img layui-anim-fadein">
                        <img data-src="{$vo.image}" src="/static/img/load.gif" style="border-radius: 10px 10px 0 0"
                             alt="{$vo.name}" width="100%"
                             height="100%"/>
                        <div style="position: relative;top: -20px;left: 5px;color: #fff;">{$vo['continu']}</div>
                    </div>
                    <div class="b-name">
                        {$vo.name}
                    </div>
                </div>
                <div class="b-play-box play{$vo.id}">
                    {foreach $vo['vod_url'] as $k=>$v }
                    <a class="b-play" href="{$domain}/dplayer?url={$v}" target="_blank">
                        {php}
                        echo isset($vo['vod_name'][$k]) ? $vo['vod_name'][$k] : '暂无'
                        {/php}
                    </a>
                    {/foreach}
                    <div class="b-back">
                        <div class="text">
                            点击此处返回
                        </div>
                    </div>
                </div>
                {/foreach}
            </div>
        </div>
    </div>
    <!--  引入外部 js   -->
    <script src="/static/js/index.js"></script>
    <script src="/static/js/img-lazy.js"></script>
    <script>
        $(function () {
            // 设置标题
            document.title = "{$title} - 在线观看";
            // 回填搜索内容
            $('#search').val("{$wd}");
        })
    </script>
    {:widget('common/foot')}